Sha256: 4caac5af2d0e729425f7c13270a1141c148ced828389b3e06c99398562e04cc3

Contents?: true

Size: 783 Bytes

Versions: 14

Compression:

Stored size: 783 Bytes

Contents

Given(/^I ask if there are info messages$/) do
  @csv_options ||= default_csv_options
  
  if @schema_json
    if @schema_type == :json_table
      @schema = Csvlint::Schema.from_json_table( @schema_url || "http://example.org ", JSON.parse(@schema_json) )
    else
      @schema = Csvlint::Schema.from_csvw_metadata( @schema_url || "http://example.org ", JSON.parse(@schema_json) )
    end
  end
  
  @validator = Csvlint::Validator.new( @url, @csv_options, @schema ) 
  @info_messages = @validator.info_messages
end

Then(/^there should be (\d+) info messages?$/) do |num|
  expect( @info_messages.count ).to eq( num.to_i )
end

Then(/^one of the messages should have the type "(.*?)"$/) do |msg_type|
  expect( @info_messages.find{|x| x.type == msg_type.to_sym} ).to be_present
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
csvlint-1.0.0 features/step_definitions/validation_info_steps.rb
csvlint-0.4.0 features/step_definitions/validation_info_steps.rb
csvlint-0.3.3 features/step_definitions/validation_info_steps.rb
csvlint-0.3.2 features/step_definitions/validation_info_steps.rb
csvlint-0.3.1 features/step_definitions/validation_info_steps.rb
csvlint-0.3.0 features/step_definitions/validation_info_steps.rb
wjordan213-csvlint-0.2.8 features/step_definitions/validation_info_steps.rb
wjordan213.csvlint-0.2.8 features/step_definitions/validation_info_steps.rb
csvlint-0.2.6 features/step_definitions/validation_info_steps.rb
csvlint-0.2.5 features/step_definitions/validation_info_steps.rb
csvlint-0.2.4 features/step_definitions/validation_info_steps.rb
csvlint-0.2.2 features/step_definitions/validation_info_steps.rb
csvlint-0.2.1 features/step_definitions/validation_info_steps.rb
csvlint-0.2.0 features/step_definitions/validation_info_steps.rb