Sha256: 8ce2cd7308c645fa94b10d436ff07f447f1f87d09432520c3d051c8963b860b5

Contents?: true

Size: 727 Bytes

Versions: 8

Compression:

Stored size: 727 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'
require 'cucumber/wire_support/wire_language'

module Cucumber
  module WireSupport
    describe WireStepDefinition, "#invoke" do
      describe "if one of the arguments is a table" do
        it "should pass the raw table to the connection" do
          connection = mock('connection')
          step_definition = WireStepDefinition.new(connection, 'id' => 'the-id')
          expected_args = ["a","b", [["1","2"],["3","4"]]]
          connection.should_receive(:invoke).with('the-id', expected_args)
          args = ["a","b"]
          args << Cucumber::Ast::Table.new([["1","2"],["3","4"]])
          step_definition.invoke(args)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
davidtrogers-cucumber-0.6.2 spec/cucumber/wire_support/wire_step_definition_spec.rb
cucumber-0.6.2 spec/cucumber/wire_support/wire_step_definition_spec.rb
cucumber-0.6.1 spec/cucumber/wire_support/wire_step_definition_spec.rb
cucumber-0.6.0 spec/cucumber/wire_support/wire_step_definition_spec.rb
cucumber-0.5.3 spec/cucumber/wire_support/wire_step_definition_spec.rb
cucumber-0.5.2 spec/cucumber/wire_support/wire_step_definition_spec.rb
cucumber-0.5.1 spec/cucumber/wire_support/wire_step_definition_spec.rb
cucumber-0.5.0 spec/cucumber/wire_support/wire_step_definition_spec.rb