Sha256: b7697f7695bac325052572c6ef716f1767170450fba04f905523679c73ba89cd

Contents?: true

Size: 981 Bytes

Versions: 4

Compression:

Stored size: 981 Bytes

Contents

Given(/^no databases have been created$/) do
  clear_db_dir
end

Given(/^I run `([^`]*)` in a single database app$/) do |command|
  run_task_in_single_db_app(command)
end


Given(/^I run `([^`]*)` in a multi database app$/) do |command|
  run_task_in_multi_db_app(command)
end


#helper

def run_task_in_single_db_app(command)
  cmd = unescape_text(command)
  cmd = extract_text(cmd) if !aruba.config.keep_ansi || aruba.config.remove_ansi_escape_sequences

  cd "../../single-db-dummy" do
    run_simple(cmd, false)
  end
end

def run_task_in_multi_db_app(command)
  cmd = unescape_text(command)
  cmd = extract_text(cmd) if !aruba.config.keep_ansi || aruba.config.remove_ansi_escape_sequences

  cd "../../multi-db-dummy" do
    run_simple(cmd, false)
  end
end

def clear_db_dir
  remove("../../single-db-dummy/db", :force => true)
  remove("../../multi-db-dummy/db", :force => true)
  create_directory "../../single-db-dummy/db"
  create_directory "../../multi-db-dummy/db"
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
multi-database-9000-0.2.2 features/step_definitions/sqlite_database_steps.rb
multi-database-9000-0.2.1 features/step_definitions/sqlite_database_steps.rb
multi-database-9000-0.2.0 features/step_definitions/sqlite_database_steps.rb
multi-database-9000-0.1.0 features/step_definitions/sqlite_database_steps.rb