Sha256: 9dab9263cb8d2733e7b7c078fc7aea4928dcf78f1a437f35f6afcfafc843a10e

Contents?: true

Size: 1.74 KB

Versions: 6

Compression:

Stored size: 1.74 KB

Contents

require 'fabrication'
require_relative '../../test/support/fabrication.rb'

Given(/^a board exists$/) do
  Fabricate(:board, external_id: 200_10)
end

Given(/^a list exists$/) do
  Fabricate(:board)
  Fabricate(:list, external_id: 200_40)
end

Given(/^a card exists$/) do
  Fabricate(:board)
  Fabricate(:list)
  Fabricate(:member)
  Fabricate(:card, external_id: 200_20)
end

Given(/^a comment exists$/) do
  Fabricate(:card, external_id: 200_20)
  Fabricate(:member)
  Fabricate(:comment, external_card_id: 200_20)
end

Given(/^(\d+) comments exist$/) do |count|
  Fabricate(:card, external_id: 200_20)
  Fabricate(:member)
  count.to_i.times do
    Fabricate(:comment, external_card_id: 200_20)
  end
end

Given(/^a default board exists$/) do
  Fabricate(:board, default: true,
                    name: 'My Default Board',
                    external_id: 200_10)
end

Given(/^a default list exists$/) do
  Fabricate(:board)
  Fabricate(:list, default: true,
                   name: 'My Default List',
                   external_id: 200_40)
end

Given(/^a default card exists$/) do
  Fabricate(:board)
  Fabricate(:list)
  Fabricate(:member)
  Fabricate(:card, default: true,
                   name:    'My Default Card',
                   external_id: 200_20)
end

Given(/^local data exists, all defaults set$/) do
  Fabricate(:board, default: true, name: 'My Default Board')
  Fabricate(:list,  default: true, name: 'My Default List')
  Fabricate(:card,  default: true, name: 'My Default Card')
  Troo::Refresh.completed!
end

Given(/^local data exists$/) do
  Fabricate(:board, default: true, name: 'My Default Board')
  Fabricate(:board)
  Fabricate(:list, default: true, name: 'My Default List')
  Fabricate(:card, external_id: 200_20)
  Troo::Refresh.completed!
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
troo-0.0.15 features/step_definitions/fabrication_steps.rb
troo-0.0.14 features/step_definitions/fabrication_steps.rb
troo-0.0.13 features/step_definitions/fabrication_steps.rb
troo-0.0.12 features/step_definitions/fabrication_steps.rb
troo-0.0.11 features/step_definitions/fabrication_steps.rb
troo-0.0.10 features/step_definitions/fabrication_steps.rb