diff --git a/acceptance/cucumber/step_definitions/development_steps.rb b/acceptance/cucumber/step_definitions/development_steps.rb index 4f51388..92e44b9 100644 --- a/acceptance/cucumber/step_definitions/development_steps.rb +++ b/acceptance/cucumber/step_definitions/development_steps.rb @@ -23,7 +23,7 @@ end Given /^I don't bother writing cucumber features$/ do - false.should be_true + false.should be true end Then /^I should be fired$/ do diff --git a/acceptance/rspec_example_spec.rb b/acceptance/rspec_example_spec.rb index 85c6249..b6d434e 100644 --- a/acceptance/rspec_example_spec.rb +++ b/acceptance/rspec_example_spec.rb @@ -6,19 +6,19 @@ describe "RSpec example" do it "should succeed" do - true.should be_true + true.should be true nil.should be_nil end it "should fail" do - true.should be_false + true.should be false end it "should be pending" describe "nested" do it "should succeed" do - true.should be_true + true.should be true end end end diff --git a/acceptance/spinach/features/steps/example_spinach_feature.rb b/acceptance/spinach/features/steps/example_spinach_feature.rb index 058b1a6..35dea47 100644 --- a/acceptance/spinach/features/steps/example_spinach_feature.rb +++ b/acceptance/spinach/features/steps/example_spinach_feature.rb @@ -16,7 +16,7 @@ class Spinach::Features::ExampleSpinachFeature < Spinach::FeatureSteps end step 'I don\'t bother writing cucumber features' do - false.should be_true + false.should be true end step 'I should be fired' do diff --git a/spec/ci/reporter/report_manager_spec.rb b/spec/ci/reporter/report_manager_spec.rb index 176162d..f33a9fb 100644 --- a/spec/ci/reporter/report_manager_spec.rb +++ b/spec/ci/reporter/report_manager_spec.rb @@ -17,14 +17,14 @@ it "should create the report directory according to the given prefix" do CI::Reporter::ReportManager.new("spec") - File.directory?(@reports_dir).should be_true + File.directory?(@reports_dir).should be true end it "should create the report directory based on CI_REPORTS environment variable if set" do @reports_dir = "#{Dir.getwd}/dummy" ENV["CI_REPORTS"] = @reports_dir CI::Reporter::ReportManager.new("spec") - File.directory?(@reports_dir).should be_true + File.directory?(@reports_dir).should be true end it "should write reports based on name and xml content of a test suite" do @@ -34,7 +34,7 @@ suite.should_receive(:to_xml).and_return("") reporter.write_report(suite) filename = "#{REPORTS_DIR}/SPEC-some-test-suite-name.xml" - File.exist?(filename).should be_true + File.exist?(filename).should be true File.open(filename) {|f| f.read.should == ""} end @@ -47,7 +47,7 @@ reporter.write_report(suite) filename = "#{REPORTS_DIR}/SPEC-#{very_long_name}"[0..CI::Reporter::ReportManager::MAX_FILENAME_SIZE].gsub(/\s/, '-') + ".xml" filename.length.should be <= 255 - File.exist?(filename).should be_true + File.exist?(filename).should be true File.open(filename) {|f| f.read.should == ""} end @@ -61,7 +61,7 @@ reporter.write_report(suite) filename = "#{REPORTS_DIR}/SPEC-#{very_long_name}"[0..170].gsub(/\s/, '-') + ".xml" filename.length.should be <= 188 - File.exist?(filename).should be_true + File.exist?(filename).should be true File.open(filename) {|f| f.read.should == ""} end @@ -74,6 +74,6 @@ suite.should_receive(:name).and_return("colliding test suite name") suite.should_receive(:to_xml).and_return("") reporter.write_report(suite) - File.exist?(filename.sub('.xml', '.0.xml')).should be_true + File.exist?(filename.sub('.xml', '.0.xml')).should be true end end diff --git a/spec/ci/reporter/rspec_spec.rb b/spec/ci/reporter/rspec_spec.rb index 0c8e296..a3d8997 100644 --- a/spec/ci/reporter/rspec_spec.rb +++ b/spec/ci/reporter/rspec_spec.rb @@ -44,7 +44,7 @@ def rspec2_failing_example(exception_text) end it "should create a test suite with one success, one failure, and one pending" do - @report_mgr.should_receive(:write_report).and_return do |suite| + @report_mgr.should_receive(:write_report) do |suite| suite.testcases.length.should == 3 suite.testcases[0].should_not be_failure suite.testcases[0].should_not be_error @@ -95,7 +95,7 @@ def rspec2_failing_example(exception_text) @formatter.should_receive(:example_passed).once @formatter.should_receive(:dump_summary) @formatter.should_receive(:dump_failures).once - @report_mgr.should_receive(:write_report).and_return do |suite| + @report_mgr.should_receive(:write_report) do |suite| suite.testcases.last.name.should == "should do something" end diff --git a/spec/ci/reporter/test_unit_spec.rb b/spec/ci/reporter/test_unit_spec.rb index 84f9d62..8f2da70 100644 --- a/spec/ci/reporter/test_unit_spec.rb +++ b/spec/ci/reporter/test_unit_spec.rb @@ -14,7 +14,7 @@ it "should build suites based on adjacent tests with the same class name" do @suite = nil - @report_mgr.should_receive(:write_report).once.and_return {|suite| @suite = suite } + @report_mgr.should_receive(:write_report).once {|suite| @suite = suite } @testunit.started(@result) @testunit.test_started("test_one(TestCaseClass)") @@ -35,7 +35,7 @@ it "should build two suites when encountering different class names" do @suites = [] - @report_mgr.should_receive(:write_report).twice.and_return {|suite| @suites << suite } + @report_mgr.should_receive(:write_report).twice {|suite| @suites << suite } @testunit.started(@result) @testunit.test_started("test_one(TestCaseClass)") @@ -57,7 +57,7 @@ it "should record assertion counts during test run" do @suite = nil - @report_mgr.should_receive(:write_report).and_return {|suite| @suite = suite } + @report_mgr.should_receive(:write_report) {|suite| @suite = suite } @testunit.started(@result) @testunit.test_started("test_one(TestCaseClass)") @@ -72,7 +72,7 @@ @failure = Test::Unit::Failure.new("test_one(TestCaseClass)", "somewhere:10", "it failed") @suite = nil - @report_mgr.should_receive(:write_report).once.and_return {|suite| @suite = suite } + @report_mgr.should_receive(:write_report).once {|suite| @suite = suite } @testunit.started(@result) @testunit.test_started("test_one(TestCaseClass)") @@ -94,7 +94,7 @@ end @suite = nil - @report_mgr.should_receive(:write_report).once.and_return {|suite| @suite = suite } + @report_mgr.should_receive(:write_report).once {|suite| @suite = suite } @testunit.started(@result) @testunit.test_started("test_one(TestCaseClass)") @@ -119,7 +119,7 @@ @failure2 = Test::Unit::Failure.new("test_one(TestCaseClass)", "somewhere:12", "it failed again in teardown") @suite = nil - @report_mgr.should_receive(:write_report).once.and_return {|suite| @suite = suite } + @report_mgr.should_receive(:write_report).once {|suite| @suite = suite } @testunit.started(@result) @testunit.test_started("test_one(TestCaseClass)") @@ -138,7 +138,7 @@ it "should count test case names that don't conform to the standard pattern" do @suite = nil - @report_mgr.should_receive(:write_report).once.and_return {|suite| @suite = suite } + @report_mgr.should_receive(:write_report).once {|suite| @suite = suite } @testunit.started(@result) @testunit.test_started("some unknown test")