Follow spec conventions for filenames

This commit is contained in:
Rémi Prévost 2011-10-10 08:54:26 -04:00
parent 600fa879d4
commit 6c6d67e12d
4 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,8 @@
require "bundler/gem_tasks"
desc "Run specs"
task :spec do # {{{
sh "bundle exec rspec --color --format=nested #{File.join(File.dirname(__FILE__), "spec/layout.rb")}"
sh "bundle exec rspec --color --format=nested #{Dir.glob(File.join(File.dirname(__FILE__), "spec/**/*_spec.rb")).join(" ")}"
end # }}}
desc "Generate documentation"

View File

@ -4,7 +4,7 @@ describe Teamocil::Layout do
context "initializing" do
it "create two windows" do # {{{
layout = Teamocil::Layout.new(examples["two-windows"], {})
layout = Teamocil::Layout.new(layouts["two-windows"], {})
commands = layout.generate_commands
commands.grep(/new-window/).length.should be 2
end # }}}

View File

@ -5,9 +5,9 @@ require 'teamocil'
module Helpers
def examples # {{{
def layouts # {{{
return @@examples if defined?(@@examples)
@@examples = YAML.load_file(File.join(File.dirname(__FILE__), "examples/layouts.yml"))
@@examples = YAML.load_file(File.join(File.dirname(__FILE__), "fixtures/layouts.yml"))
end # }}}
end