Sha256: 52454773618d7429e365146ce1e8a374d9cfad4863b55974b7dddd5af7f7813c

Contents?: true

Size: 819 Bytes

Versions: 2

Compression:

Stored size: 819 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 -a 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.1-java features/step_definitions/approve_dependencies_steps.rb
license_finder-0.8.1 features/step_definitions/approve_dependencies_steps.rb