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

Add shoulda-context and example tests #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ArturT
Copy link
Member

@ArturT ArturT commented Apr 16, 2016

Related PR
KnapsackPro/knapsack#37

This PR is using knapsack gem on CI based on the branch: https://github.com/ArturT/knapsack/tree/shoulda-context

How to test if knapsack support for shoulda-context works? Please generate report with

KNAPSACK_GENERATE_REPORT=true bundle exec rake test

The result reports should not contain the wrong path like
/Users/artur/.rvm/gems/ruby-2.3.0/gems/shoulda-context-1.2.1/lib/shoulda/context/context.rb

Correct expected path is test/shoulda_context/calculator_test.rb

Example output for generated report:

{
  "test/minitest_duplicated/meme_unit_test.rb": 0.00022482872009277344,
  "/Users/artur/.rvm/gems/ruby-2.3.0/gems/shoulda-context-1.2.1/lib/shoulda/context/context.rb": 0.0001289844512939453,
  "test/minitest/meme_spec_test.rb": 7.867813110351562e-05,
  "test/minitest_duplicated/meme_spec_test.rb": 0.00011181831359863281,
  "test/controllers/articles_controller_test.rb": 0.4389979839324951,
  "test/models/article_test.rb": 2.6226043701171875e-05,
  "test/controllers/welcome_controller_test.rb": 0.012137889862060547
}

If you want to test knapsack gem from you local repo then update Gemfile and use your own path.

gem 'knapsack', path: ENV['KNAPSACK_REPO_PATH'] || '~/Documents/github/knapsack-pro/knapsack'

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.

1 participant