Permalink
Browse files

using new rspec syntax to avoid deprecation warnings

  • Loading branch information...
1 parent ee333c8 commit c37ebc3204c949ca049579384b8c203f5e86bd64 @rafaelss committed Oct 18, 2012
Showing with 5 additions and 5 deletions.
  1. +3 −3 spec/cielo/validity_spec.rb
  2. +2 −2 spec/cielo_spec.rb
@@ -10,15 +10,15 @@
end
it "raises an exception if year is not valid" do
- expect { described_class.new(Time.now.year - 1, Time.now.month) }.should raise_error(described_class::InvalidDate)
+ expect { described_class.new(Time.now.year - 1, Time.now.month) }.to raise_error(described_class::InvalidDate)
end
it "raises an exception if month is not valid" do
- expect { described_class.new(Time.now.year, Time.now.month - 1) }.should raise_error(described_class::InvalidDate)
+ expect { described_class.new(Time.now.year, Time.now.month - 1) }.to raise_error(described_class::InvalidDate)
end
it "raises an exception if both year and month are not valid" do
- expect { described_class.new(Time.now.year - 1, Time.now.month - 1) }.should raise_error(described_class::InvalidDate)
+ expect { described_class.new(Time.now.year - 1, Time.now.month - 1) }.to raise_error(described_class::InvalidDate)
end
describe "#to_s" do
View
@@ -2,12 +2,12 @@
describe Cielo do
it "returns a configuration instance" do
- Cielo.configuration.should be_instance_of(Cielo::Configuration)
+ expect(Cielo.configuration).to be_instance_of(Cielo::Configuration)
end
it "yields a configuration instance" do
configuration = nil
Cielo.configure { |c| configuration = c }
- configuration.should be_instance_of(Cielo::Configuration)
+ expect(configuration).to be_instance_of(Cielo::Configuration)
end
end

0 comments on commit c37ebc3

Please sign in to comment.