Skip to content

Instantly share code, notes, and snippets.

@eduardodeoh
Last active December 21, 2015 02:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eduardodeoh/c2f2bfb13135b7f64f7f to your computer and use it in GitHub Desktop.
Save eduardodeoh/c2f2bfb13135b7f64f7f to your computer and use it in GitHub Desktop.
Minitest
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
require 'test_helper'
class ArticleTest < ActiveSupport::TestCase
test "should not save article without title" do
article = Article.new
assert_not article.save
end
end
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