test/wagons_installer_test.rb in wagons-0.4.1 vs test/wagons_installer_test.rb in wagons-0.4.2

- old
+ new

@@ -30,16 +30,16 @@ assert_equal @superliner2, installer.available_spec("#{app_name}_superliner") assert_nil installer.available_spec("#{app_name}_fantasy") end test 'check app dependency is fine if app is sufficient' do - installer.stubs(:wagon_class).with(@slave1).returns(stub(app_requirement: Gem::Requirement.new('1.0'))) + installer.stubs(:wagon_class).with(@slave1).returns(stub(:app_requirement => Gem::Requirement.new('1.0'))) assert_equal [], installer.check_app_requirement([@master2, @slave1]) end test 'check app dependency fails if app is too old' do - installer.stubs(:wagon_class).with(@superliner2).returns(stub(app_requirement: Gem::Requirement.new('>= 2.0'))) + installer.stubs(:wagon_class).with(@superliner2).returns(stub(:app_requirement => Gem::Requirement.new('>= 2.0'))) msg = installer.check_app_requirement([@master2, @superliner2]) assert_equal 1, msg.size assert_match /requires/, msg.first end @@ -131,11 +131,11 @@ content = File.read(WAGONFILE) assert_match /^gem '#{app_name}_master', '1.0.0'$/, content end test 'install fails when checks go wrong' do - installer.stubs(:wagon_class).with(@superliner2).returns(stub(app_requirement: Gem::Requirement.new('>= 2.0'))) + installer.stubs(:wagon_class).with(@superliner2).returns(stub(:app_requirement => Gem::Requirement.new('>= 2.0'))) installer.expects(:wagonfile_edit).never assert_match /requires/, installer.install(["#{app_name}_superliner"]) end test 'install fails when name is invalid' do @@ -185,10 +185,10 @@ @installer = Wagons::Installer.new @installer.stubs(:load_available_specs).returns([@master1, @master2, @slave1, @superliner1, @superliner2]) @installer.stubs(:installed).returns([@master1, @slave1]) @installer.stubs(:wagonfile).returns(WAGONFILE) @installer.stubs(:remove_wagons).returns(nil) - @installer.stubs(:wagon_class).returns(stub(app_requirement: Gem::Requirement.new)) + @installer.stubs(:wagon_class).returns(stub(:app_requirement => Gem::Requirement.new)) end def stub_wagons Wagons.stubs(:find).returns(stub(:protect? => false)) end