summaryrefslogtreecommitdiff
path: root/spec/mspec/spec/expectations/should_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/mspec/spec/expectations/should_spec.rb')
-rw-r--r--spec/mspec/spec/expectations/should_spec.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/mspec/spec/expectations/should_spec.rb b/spec/mspec/spec/expectations/should_spec.rb
index b8bda8f86f..472890979d 100644
--- a/spec/mspec/spec/expectations/should_spec.rb
+++ b/spec/mspec/spec/expectations/should_spec.rb
@@ -1,17 +1,17 @@
require 'spec_helper'
require 'rbconfig'
-describe "MSpec" do
+RSpec.describe "MSpec" do
before :all do
path = RbConfig::CONFIG['bindir']
exe = RbConfig::CONFIG['ruby_install_name']
- file = File.dirname(__FILE__) + '/should.rb'
+ file = File.expand_path('../../fixtures/should.rb', __FILE__)
@out = `#{path}/#{exe} #{file}`
end
describe "#should" do
it "records failures" do
- @out.should include <<-EOS
+ expect(@out).to include <<-EOS
1)
MSpec expectation method #should causes a failure to be recorded FAILED
Expected 1 == 2
@@ -20,7 +20,7 @@ EOS
end
it "raises exceptions for examples with no expectations" do
- @out.should include <<-EOS
+ expect(@out).to include <<-EOS
2)
MSpec expectation method #should registers that an expectation has been encountered FAILED
No behavior expectation was found in the example
@@ -30,7 +30,7 @@ EOS
describe "#should_not" do
it "records failures" do
- @out.should include <<-EOS
+ expect(@out).to include <<-EOS
3)
MSpec expectation method #should_not causes a failure to be recorded FAILED
Expected 1 == 1
@@ -39,7 +39,7 @@ EOS
end
it "raises exceptions for examples with no expectations" do
- @out.should include <<-EOS
+ expect(@out).to include <<-EOS
4)
MSpec expectation method #should_not registers that an expectation has been encountered FAILED
No behavior expectation was found in the example
@@ -48,14 +48,14 @@ EOS
end
it "prints status information" do
- @out.should include ".FF..FF."
+ expect(@out).to include ".FF..FF."
end
it "prints out a summary" do
- @out.should include "0 files, 8 examples, 6 expectations, 4 failures, 0 errors"
+ expect(@out).to include "0 files, 8 examples, 6 expectations, 4 failures, 0 errors"
end
it "records expectations" do
- @out.should include "I was called 6 times"
+ expect(@out).to include "I was called 6 times"
end
end