lib/chop/dsl.rb in chop-0.15.0 vs lib/chop/dsl.rb in chop-0.16.0

- old
+ new

@@ -1,9 +1,9 @@ module Chop module DSL - def create! table, klass, &block - Create.create! table, klass, &block + def create! klass, table, &block + Create.create! klass, table, &block end def diff! selector, table, session: Capybara.current_session, &block class_name = session.find(selector).tag_name.capitalize klass = const_get("Chop::#{class_name}") @@ -17,13 +17,13 @@ end if defined?(Cucumber::MultilineArgument::DataTable) Cucumber::MultilineArgument::DataTable.prepend Module.new { def create! klass, &block - Chop.create! self, klass, &block + Chop.create! klass, self, &block end - def diff! other_table, options={}, &block + def diff! other_table="table", options={}, &block if other_table.is_a?(String) && !other_table.include?("|") Chop.diff! other_table, self, &block else super end