Sha256: 62435edc75b2491a3c3d80012b8dc45b6e6f02655a32d7f05ec2d544edc190d4

Contents?: true

Size: 824 Bytes

Versions: 2

Compression:

Stored size: 824 Bytes

Contents

Given(/^I have an app with license finder that depends on a GPL licensed gem$/) do
  @user = ::DSL::User.new
  @user.create_nonrails_app
  @user.add_dependency_to_app "gpl_gem", :license => "GPL"
end

When(/^I approve that gem$/) do
  @output = @user.execute_command "license_finder"
  @output.should include "gpl_gem"
  @output = @user.execute_command "license_finder approve gpl_gem"
  @output = @user.execute_command "license_finder -q"
end

Then(/^I should not see that gem in the console output$/) do
  @output.should_not include "gpl_gem"
end

Then(/^I should see that gem approved in dependencies\.html$/) do
  gem_name = "gpl_gem"
  css_class = "approved"
  html = File.read(@user.dependencies_html_path)
  page = Capybara.string(html)
  gpl_gem = page.find("##{gem_name}")
  gpl_gem[:class].should == css_class
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
license_finder-0.8.2-java features/step_definitions/approve_dependencies_steps.rb
license_finder-0.8.2 features/step_definitions/approve_dependencies_steps.rb