Sha256: 6a26137f021e72a2d4bae923c797b4dc5f423b61423d0090cb4609b40cca29ab
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
Contents
require File.expand_path('../../test_helper', __FILE__) require 'kicker/recipes/rails' describe "The Kicker::Recipes::Rails handler" do before do @kicker = Kicker.new({}) @kicker.stubs(:execute_command) @handler = Kicker::Recipes::Rails.new(@kicker, []) end it "should instantiate a new instance and call the #handle! method when called" do files = %w{} instance = mock('Kicker::Recipes::Rails') instance.expects(:handle!) Kicker::Recipes::Rails.expects(:new).with(@kicker, files).returns(instance) Kicker::Recipes::Rails.call(@kicker, files) end it "should match, extract, and run any test case files that have changed" do lib_file = File.expand_path('lib/foo.rb') @handler.files << lib_file @handler.files << File.expand_path('test/1_test.rb') @handler.files << File.expand_path('test/namespace/2_test.rb') @kicker.expects(:execute_command).with("ruby -r test/1_test.rb -r test/namespace/2_test.rb -e ''") @handler.handle! @handler.test_files.should == %w{ test/1_test.rb test/namespace/2_test.rb } @handler.files.should == [lib_file] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alloy-kicker-1.9.2 | test/recipes/rails_test.rb |
alloy-kicker-1.9.3 | test/recipes/rails_test.rb |