Last active
December 21, 2015 02:52
-
-
Save eduardodeoh/c2f2bfb13135b7f64f7f to your computer and use it in GitHub Desktop.
Minitest
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 'test_helper' | |
class FizzBuzzTest < Minitest::Test | |
def setup | |
@fb ||= FizzBuzz.new | |
end | |
def test_converts_multiples_of_fifteen_to_fizzbuzz | |
assert_equal 'Buzz', @fb.convert(5) | |
end | |
def test_converts_multiples_of_five_to_buzz | |
assert_equal 'Buzz', @fb.convert(3) | |
end | |
def teardown | |
end | |
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 'test_helper' | |
class ArticleTest < ActiveSupport::TestCase | |
test "should not save article without title" do | |
article = Article.new | |
assert_not article.save | |
end | |
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 'test_helper' | |
describe "Lebowski", "new syntax" do | |
let(:the_dude) { Lebowski.new(name: "Jeffrey") } | |
it "should abide" do | |
_(the_dude).must :abide? | |
expect(the_dude).must :abide? | |
value(the_dude).must :abide? | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment