Skip to content
This repository
Browse code

Facepunch failing tests.

  • Loading branch information...
commit d19768b50c246c55b0c57403a7b79006100cab0a 1 parent 80d9b72
José Valim authored
12  railties/test/generators/migration_generator_test.rb
@@ -34,12 +34,12 @@ def test_add_migration_with_attributes
34 34
     run_generator [migration, "title:string", "body:text"]
35 35
 
36 36
     assert_migration "db/migrate/#{migration}.rb" do |content|
37  
-      assert_class_method :up, content do |up|
  37
+      assert_method :up, content do |up|
38 38
         assert_match /add_column :posts, :title, :string/, up
39 39
         assert_match /add_column :posts, :body, :text/, up
40 40
       end
41 41
 
42  
-      assert_class_method :down, content do |down|
  42
+      assert_method :down, content do |down|
43 43
         assert_match /remove_column :posts, :title/, down
44 44
         assert_match /remove_column :posts, :body/, down
45 45
       end
@@ -51,12 +51,12 @@ def test_remove_migration_with_attributes
51 51
     run_generator [migration, "title:string", "body:text"]
52 52
 
53 53
     assert_migration "db/migrate/#{migration}.rb" do |content|
54  
-      assert_class_method :up, content do |up|
  54
+      assert_method :up, content do |up|
55 55
         assert_match /remove_column :posts, :title/, up
56 56
         assert_match /remove_column :posts, :body/, up
57 57
       end
58 58
 
59  
-      assert_class_method :down, content do |down|
  59
+      assert_method :down, content do |down|
60 60
         assert_match /add_column :posts, :title, :string/, down
61 61
         assert_match /add_column :posts, :body, :text/, down
62 62
       end
@@ -68,11 +68,11 @@ def test_should_create_empty_migrations_if_name_not_start_with_add_or_remove
68 68
     run_generator [migration, "title:string", "content:text"]
69 69
 
70 70
     assert_migration "db/migrate/#{migration}.rb" do |content|
71  
-      assert_class_method :up, content do |up|
  71
+      assert_method :up, content do |up|
72 72
         assert_match /^\s*$/, up
73 73
       end
74 74
 
75  
-      assert_class_method :down, content do |down|
  75
+      assert_method :down, content do |down|
76 76
         assert_match /^\s*$/, down
77 77
       end
78 78
     end
6  railties/test/generators/model_generator_test.rb
@@ -99,13 +99,13 @@ def test_migration_with_attributes
99 99
     run_generator ["product", "name:string", "supplier_id:integer"]
100 100
 
101 101
     assert_migration "db/migrate/create_products.rb" do |m|
102  
-      assert_class_method :up, m do |up|
  102
+      assert_method :up, m do |up|
103 103
         assert_match /create_table :products/, up
104 104
         assert_match /t\.string :name/, up
105 105
         assert_match /t\.integer :supplier_id/, up
106 106
       end
107 107
 
108  
-      assert_class_method :down, m do |down|
  108
+      assert_method :down, m do |down|
109 109
         assert_match /drop_table :products/, down
110 110
       end
111 111
     end
@@ -141,7 +141,7 @@ def test_migration_timestamps_are_skipped
141 141
     run_generator ["account", "--no-timestamps"]
142 142
 
143 143
     assert_migration "db/migrate/create_accounts.rb" do |m|
144  
-      assert_class_method :up, m do |up|
  144
+      assert_method :up, m do |up|
145 145
         assert_no_match /t.timestamps/, up
146 146
       end
147 147
     end

0 notes on commit d19768b

Please sign in to comment.
Something went wrong with that request. Please try again.