spec/rspec/the_spec.rb in rspec-the-0.0.2 vs spec/rspec/the_spec.rb in rspec-the-1.0.0
- old
+ new
@@ -1,7 +1,7 @@
require 'rspec/the'
-require 'counter'
+require 'spec_helper'
describe RSpec::The do
describe '#the' do
context 'basic usage' do
let(:counter) { Counter.new }
@@ -12,10 +12,10 @@
end
context '#are_expected' do
let(:counter) { Counter.new }
before { expect(counter.next).to eq 1 }
- let(:nexts) { 5.times.inject([]) { |acc| acc << counter.next } }
+ let(:nexts) { 5.times.inject [] { |acc| acc << counter.next } }
the(:nexts) { are_expected.to eq [2, 3, 4, 5, 6] }
after { expect(counter.next).to eq 7 }
end
end
end