mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-07 01:38:50 +01:00
merge upstream
This commit is contained in:
parent
c58186451f
commit
ce1c092173
72 changed files with 4469 additions and 0 deletions
19
spec/scenarios/contexts_scenario.rb
Normal file
19
spec/scenarios/contexts_scenario.rb
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
class ContextsScenario < Scenario::Base
|
||||
uses :users
|
||||
|
||||
def load
|
||||
%w(Call Email Errand Someday).each_with_index do |context, index|
|
||||
create_context context, index+1
|
||||
end
|
||||
end
|
||||
|
||||
def create_context(name, position)
|
||||
create_model :context, name.downcase.to_sym,
|
||||
:name => name,
|
||||
:position => position,
|
||||
:hide => name == 'Someday' ? true : false,
|
||||
:created_at => Time.now,
|
||||
:updated_at => Time.now,
|
||||
:user_id => user_id(:sean)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue