Sha256: 8ac23c0a5a2a8d2d216bc996230c87da457c6a22622d89bcdceb9508a9d33d50
Contents?: true
Size: 775 Bytes
Versions: 1
Compression:
Stored size: 775 Bytes
Contents
require "spec_helper" describe RSpec::ExpectIt::ExpectationTargets::ExpectIts do let(:context) do double("context").tap do |context| context.stub(:expect) {|arg| expect(arg) } context.stub(:subject) { context_subject } end end let(:context_subject) do double("subject").tap do |subject| subject.stub(method) { method_return_value } end end let(:method) { :a_method } let(:method_return_value) { Object.new } subject { RSpec::ExpectIt::ExpectationTargets::ExpectIts.new(context, method) } describe "#to" do specify { subject.to eq method_return_value } end describe "#not_to" do specify { expect{ subject.to_not eq method_return_value }.to raise_error(RSpec::Expectations::ExpectationNotMetError) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-expect_it-2.0.0 | spec/rspec/expect_it/expectation_targets/expect_its_spec.rb |