Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert setup/teardown methods to before/after blocks #21

Merged
merged 2 commits into from
Mar 12, 2018

Conversation

dabroz
Copy link
Contributor

@dabroz dabroz commented Mar 11, 2018

Allows to convert code written in this format:

require 'test_helper'

class BananaTest < ActiveSupport::TestCase
  include Monkeys

  def setup
    fend_off_the_monkeys
  end

  test "is delicious" do
    assert Banana.new.delicious?
  end

  def teardown
    appologize_to_the_monkeys
  end
end

@jaredbeck
Copy link
Owner

Don't we already have this feature? See spec/fixtures/13_setup_teardown

@jaredbeck
Copy link
Owner

Ah I see, we have setup do, and this is about def setup. 👍

@jaredbeck jaredbeck merged commit 99cd8e2 into jaredbeck:master Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants