Skip to content

Instantly share code, notes, and snippets.

@cheald
Created December 6, 2012 05:37
Show Gist options
  • Save cheald/4222032 to your computer and use it in GitHub Desktop.
Save cheald/4222032 to your computer and use it in GitHub Desktop.
describe "#excerpt" do
context "when there is a post excerpt" do
let(:post_options) {{
:wp_excerpt => "This is a WP excerpt",
:content => "This is the post content"
}}
its(:excerpt) { should == "This is a WP excerpt" }
end
context "when there is not a post excerpt" do
let(:post_options) {{
:content => "This is the post content"
}}
its(:excerpt) { should == "This is the post content." }
end
end
describe User do
describe "#delete!" do
it "should mark a record as deleted" do
expect { subject.delete! }.to change { subject.deleted? }.to true
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment