Last active
December 17, 2015 19:38
-
-
Save emilybache/5661323 to your computer and use it in GitHub Desktop.
I'm having trouble getting started with approval testing in ruby, I can't find any documentation, and I can't seem to make sense of the source code. I'd really appreciate some help getting this code to run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'approvals' | |
require 'approvals/rspec' | |
Approvals.configuration.approvals_path = './' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def answer | |
42 | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require './spec_helper' | |
require './untitled' | |
describe "untitled" do | |
context "when doing sums" do | |
it "multiplies correctly" do | |
Approvals.verify(answer, :name => "untitled_test") | |
end | |
end | |
subject do | |
answer | |
end | |
it "works" do | |
approve do | |
subject | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment