Sha256: 070939645e9dc8a29686f30d514eec763755082cf7c5b19c62b23f3ba264dd2c
Contents?: true
Size: 629 Bytes
Versions: 6
Compression:
Stored size: 629 Bytes
Contents
require "spec_helper" require "fixtures/post" describe ElabsMatchers::Matchers::Persist do let(:post) { ElabsMatchers::Orm::Post.create(:title => "New", :body => "Lorem") } subject { post } describe "#persist" do it "returns true if the value is the supplied" do should persist(:title, "Updated") expect { should_not persist(:title, "Updated") }.to fail_assertion end it "returns false if the value isn't the supplied" do post.stub(:title).and_return("New") should_not persist(:title, "Updated") expect { should persist(:title, "Updated") }.to fail_assertion end end end
Version data entries
6 entries across 6 versions & 1 rubygems