Permalink
Browse files

specs no longer use deprecated RSpec 'should'

  • Loading branch information...
1 parent 7d238c0 commit e54c41b38e1c8ed2ba1a1745f2f9e5561cbcfca1 @mdb committed Jul 17, 2014
Showing with 12 additions and 12 deletions.
  1. +10 −10 spec/lib/wp2middleman/post_spec.rb
  2. +2 −2 spec/support/matchers/exit_with_code.rb
@@ -13,61 +13,61 @@
describe "#title" do
subject { post_one.title }
- it { should eq "A Title" }
+ it { is_expected.to eq "A Title" }
end
describe "#post_date" do
subject { post_one.post_date }
- it { should eq "2012-06-08 03:21:41" }
+ it { is_expected.to eq "2012-06-08 03:21:41" }
end
describe "#date_published" do
subject { post_one.date_published }
- it { should eq "2012-06-08" }
+ it { is_expected.to eq "2012-06-08" }
end
describe "#status" do
subject { post_three.status }
- it { should eq "private" }
+ it { is_expected.to eq "private" }
end
describe "#field" do
subject { post_one.field('wp:post_id') }
- it { should eq "84" }
+ it { is_expected.to eq "84" }
end
describe "#published?" do
subject { post_one.published? }
- it { should eq true }
+ it { is_expected.to eq true }
context "#status is not 'publish'" do
subject { post_three.published? }
- it { should eq false }
+ it { is_expected.to eq false }
end
end
describe "#content" do
subject { post_one.content }
- it { should eq "Paragraph one.\n\n Paragraph two.\n " }
+ it { is_expected.to eq "Paragraph one.\n\n Paragraph two.\n " }
end
describe "#tags" do
subject { post_two.tags }
- it { should eq ["some_tag", "another tag", "tag"] }
+ it { is_expected.to eq ["some_tag", "another tag", "tag"] }
context "the post only has an 'Uncategorized' tag" do
subject { post_one.tags }
- it { should eq [] }
+ it { is_expected.to eq [] }
end
end
@@ -10,12 +10,12 @@
actual and actual == exp_code
end
- failure_message_for_should do |block|
+ failure_message do |block|
"expected block to call exit(#{exp_code}) but exit" +
(actual.nil? ? " not called" : "(#{actual}) was called")
end
- failure_message_for_should_not do |block|
+ failure_message_when_negated do |block|
"expected block not to call exit(#{exp_code})"
end

0 comments on commit e54c41b

Please sign in to comment.