Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

using new rspec syntax to avoid deprecation warnings

  • Loading branch information...
commit c37ebc3204c949ca049579384b8c203f5e86bd64 1 parent ee333c8
@rafaelss authored
Showing with 5 additions and 5 deletions.
  1. +3 −3 spec/cielo/validity_spec.rb
  2. +2 −2 spec/cielo_spec.rb
View
6 spec/cielo/validity_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
4 spec/cielo_spec.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.