Skip to content

Commit

Permalink
fixturesをmysql用の記述に変更
Browse files Browse the repository at this point in the history
  • Loading branch information
suzupy committed Jul 7, 2015
1 parent 1dca580 commit 308a2a4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
2 changes: 0 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ GEM
notiffany (0.0.6)
nenv (~> 0.1)
shellany (~> 0.0)
pg (0.17.1)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
Expand Down Expand Up @@ -367,7 +366,6 @@ DEPENDENCIES
mini_magick (= 3.8.0)
minitest-reporters (= 1.0.5)
mysql2 (= 0.3.18)
pg (= 0.17.1)
puma (= 2.11.1)
rails (= 4.2.3)
rails_12factor (= 0.0.2)
Expand Down
18 changes: 9 additions & 9 deletions test/fixtures/microposts.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
orange:
content: "I just ate an orange!"
created_at: <%= 10.minutes.ago %>
created_at: <%= 10.minutes.ago.to_s(:db) %>
user: michael

tau_manifesto:
content: "Check out the @tauday site by @mhartl: http://tauday.com"
created_at: <%= 3.years.ago %>
created_at: <%= 3.years.ago.to_s(:db) %>
user: michael

cat_video:
content: "Sad cats are sad: http://youtu.be/PKffm2uI4dk"
created_at: <%= 2.hours.ago %>
created_at: <%= 2.hours.ago.to_s(:db) %>
user: michael

most_recent:
content: "Writing a short test"
created_at: <%= Time.zone.now %>
created_at: <%= Time.zone.now.to_s(:db) %>
user: michael

<% 30.times do |n| %>
micropost_<%= n %>:
content: <%= Faker::Lorem.sentence(5) %>
created_at: <%= 42.days.ago %>
created_at: <%= 42.days.ago.to_s(:db) %>
user: michael
<% end %>

ants:
content: "Oh, is that what you want? Because that's how you get ants!"
created_at: <%= 2.years.ago %>
created_at: <%= 2.years.ago.to_s(:db) %>
user: archer

zone:
content: "Danger zone!"
created_at: <%= 3.days.ago %>
created_at: <%= 3.days.ago.to_s(:db) %>
user: archer

tone:
content: "I'm sorry. Your words made sense, but your sarcastic tone did not."
created_at: <%= 10.minutes.ago %>
created_at: <%= 10.minutes.ago.to_s(:db) %>
user: lana

van:
content: "Dude, this van's, like, rolling probable cause."
created_at: <%= 4.hours.ago %>
created_at: <%= 4.hours.ago.to_s(:db) %>
user: lana
10 changes: 5 additions & 5 deletions test/fixtures/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@ michael:
password_digest: <%= User.digest('password') %>
admin: true
activated: true
activated_at: <%= Time.zone.now %>
activated_at: <%= Time.zone.now.to_s(:db) %>

archer:
name: Sterling Archer
email: duchess@example.gov
password_digest: <%= User.digest('password') %>
activated: true
activated_at: <%= Time.zone.now %>
activated_at: <%= Time.zone.now.to_s(:db) %>

lana:
name: Lana Kane
email: hands@example.gov
password_digest: <%= User.digest('password') %>
activated: true
activated_at: <%= Time.zone.now %>
activated_at: <%= Time.zone.now.to_s(:db) %>

mallory:
name: Mallory Archer
email: boss@example.gov
password_digest: <%= User.digest('password') %>
activated: true
activated_at: <%= Time.zone.now %>
activated_at: <%= Time.zone.now.to_s(:db) %>

<% 30.times do |n| %>
user_<%= n %>:
name: <%= "User #{n}" %>
email: <%= "user-#{n}@example.com" %>
password_digest: <%= User.digest('password') %>
activated: true
activated_at: <%= Time.zone.now %>
activated_at: <%= Time.zone.now.to_s(:db) %>
<% end %>

0 comments on commit 308a2a4

Please sign in to comment.