-
-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unset variables using Bundler tooling
- Loading branch information
Showing
3 changed files
with
56 additions
and
7 deletions.
There are no files selected for viewing
43 changes: 38 additions & 5 deletions
43
features/03_testing_frameworks/cucumber/disable_bunder.feature
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,51 @@ | ||
Feature: Disable Bundler environment | ||
Use the @disable-bundler tag to escape from your project's Gemfile. | ||
|
||
Background: | ||
Given I use the fixture "cli-app" | ||
|
||
@disable-bundler | ||
Scenario: Clear the Bundler environment | ||
|
||
Given I use the fixture "cli-app" | ||
Given a file named "features/run.feature" with: | ||
""" | ||
Feature: My Feature | ||
@disable-bundler | ||
Scenario: Check environment | ||
When I run `env` | ||
Then the output should not match /^BUNDLE_GEMFILE=/ | ||
@disable-bundler | ||
Scenario: Run bundle in a fresh bundler environment | ||
Given a file named "Gemfile" with: | ||
\"\"\" | ||
source 'https://rubygems.org' | ||
\"\"\" | ||
When I run `bundle` | ||
Then the output should not contain "aruba" | ||
@disable-bundler | ||
Scenario: Run programs that are not in the outer bundle | ||
Given a file named "Gemfile" with: | ||
\"\"\" | ||
source 'https://rubygems.org' | ||
gem 'rubocop' | ||
\"\"\" | ||
When I run `bundle` | ||
When I run `bundle exec rubocop --help` | ||
Then the output should contain "Usage: rubocop" | ||
""" | ||
When I run `cucumber` | ||
When I run `bundle` | ||
When I run `bundle exec cucumber` | ||
Then the features should all pass | ||
|
||
@disable-bundler | ||
Scenario: Direct test | ||
Given I use the fixture "cli-app" | ||
Given a file named "Gemfile" with: | ||
""" | ||
source 'https://rubygems.org' | ||
gem 'parallel_tests' | ||
""" | ||
When I successfully run `bundle` | ||
When I successfully run `bundle exec parallel_rspec --help` | ||
Then the output should contain "Run all tests in parallel" |
This file contains 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
This file contains 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