Running all features
Disabling profiles…
F-----
(: failed steps (:
Could not find table ‘shows’ (ActiveRecord::StatementInvalid)
./features/step_definitions/show_mark_attended_steps.rb:2:in /^a Show$/' features/show_mark_attended.feature:8:in
Given a Show
*****In features/show_mark_attended.feature:8:in `Given a Show
1 Given /^a Show$/
do
2 @show =
Show.create!
3 end
*****The model
1 class Show <
ActiveRecord::Base
2 end
ruby-1.9.2-p180@headspace wojtek@ubuntu:~/Projects/Rails/headspace> rake
db:setup
db/test.sqlite3 already exists
db/test.sqlite3 already exists
db/development.sqlite3 already exists
db/development.sqlite3 already exists
– create_table(“shows”, {:force=>true})
-> 0.2230s
– create_table(“users”, {:force=>true})
-> 0.2195s
– initialize_schema_migrations_table()
-> 0.0004s
– assume_migrated_upto_version(20110616091905,
["/home/wojtek/Projects/Rails/headspace/db/migrate"])
-> 0.0006s
ruby-1.9.2-p180@headspace wojtek@ubuntu:~/Projects/Rails/headspace>
rails db
SQLite version 3.7.4
Enter “.help” for instructions
Enter SQL statements terminated with a “;”
sqlite> .tables
schema_migrations shows users
sqlite>
So why “Could not find table ‘shows’ (ActiveRecord::StatementInvalid)”
from
cuke?
check this out:
ruby-1.9.2-p180@headspace wojtek@ubuntu:~/Projects/Rails/headspace>
rails c
Loading development environment (Rails 3.1.0.rc4)
no such file to load – /home/wojtek/.railsrc
show = Show.create!
SQL (93.8ms) INSERT INTO “shows” (“created_at”, “updated_at”) VALUES
(?,
?) [[“created_at”, Tue, 21 Jun 2011 20:59:53 UTC +00:00],
[“updated_at”,
Tue, 21 Jun 2011 20:59:53 UTC +00:00]]
=> #<Show id: 1, created_at: “2011-06-21 20:59:53”, updated_at:
“2011-06-21
20:59:53”>