Sha256: 219024d7d1a9463377525bf198f85e619d62fff447e4f1c1e870520e37bf8451

Contents?: true

Size: 597 Bytes

Versions: 1

Compression:

Stored size: 597 Bytes

Contents

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

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
csvlint-0.1.0 features/step_definitions/validation_info_steps.rb