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" desc "Run specs"
task :spec do # {{{ 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 # }}} end # }}}
desc "Generate documentation" desc "Generate documentation"

View File

@ -4,7 +4,7 @@ describe Teamocil::Layout do
context "initializing" do context "initializing" do
it "create two windows" 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 = layout.generate_commands
commands.grep(/new-window/).length.should be 2 commands.grep(/new-window/).length.should be 2
end # }}} end # }}}

View File

@ -5,9 +5,9 @@ require 'teamocil'
module Helpers module Helpers
def examples # {{{ def layouts # {{{
return @@examples if defined?(@@examples) 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 # }}}
end end