spec/tests/filler_tests.rb in ferry-1.3.1 vs spec/tests/filler_tests.rb in ferry-1.3.2
- old
+ new
@@ -7,10 +7,11 @@
# make sure that we successfully load (fill) that database with the sql file's content
# but how to measure that it was a success or not?
# number of records?
# content?
# queries to see if things match
+# but when we import the data - how do we match that to the schema and application knowledge already in place?
describe "filler" do
describe "sqlite3" do
before(:all) do
connect("sqlite3")
Contexts.setup
@@ -27,18 +28,15 @@
it "should error if the specified database does not exist" do
expect{filler.fill('thisdatabasedoesnotexist', 'support/sample_database.sql')}.to raise_error
end
- it "should correctly import the sql file" do
- pending("still thinking of a way to test this")
- raise
- end
-
it "should return the expected query results given some query" do
- pending("still thinking of a way to test this")
+ pending("test strategy still being devised")
raise
+ # filler.fill('sqlite3', 'support/sample_database.sql')
+ # expect(ActiveRecord::Base.connection.execute("SELECT * FROM players;").length).to eql(11799)
end
end
describe "postgresql" do
before(:all) do
@@ -57,18 +55,15 @@
it "should error if the specified database does not exist" do
expect{filler.fill('thisdatabasedoesnotexist', 'support/sample_database.sql')}.to raise_error
end
- it "should correctly import the sql file" do
- pending("still thinking of a way to test this")
- raise
- end
-
it "should return the expected query results given some query" do
- pending("still thinking of a way to test this")
+ pending("test strategy still being devised")
raise
+ # filler.fill('postgresql', 'support/sample_database.sql')
+ # expect(ActiveRecord::Base.connection.execute("SELECT * FROM players;").length).to eql(11799)
end
end
describe "mysql2" do
before(:all) do
@@ -87,16 +82,13 @@
it "should error if the specified database does not exist" do
expect{filler.fill('thisdatabasedoesnotexist', 'support/sample_database.sql')}.to raise_error
end
- it "should correctly import the sql file" do
- pending("still thinking of a way to test this")
- raise
- end
-
it "should return the expected query results given some query" do
- pending("still thinking of a way to test this")
+ pending("test strategy still being devised")
raise
+ # filler.fill('mysql2', 'support/sample_database.sql')
+ # expect(ActiveRecord::Base.connection.execute("SELECT * FROM players;").length).to eql(11799)
end
end
end