method
assert_class_method
v3.0.7 -
Show latest stable
-
0 notes -
Class: Rails::Generators::TestCase
- 1.0.0
- 1.1.0
- 1.1.1
- 1.1.6
- 1.2.0
- 1.2.6
- 2.0.0
- 2.0.1
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.2
- 2.3.8
- 3.0.0 (0)
- 3.0.5 (0)
- 3.0.7 (0)
- 3.0.9 (-38)
- 3.1.0 (0)
- 3.2.1 (2)
- 3.2.3 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- What's this?
assert_class_method(method, content, &block)
public
Asserts the given class method exists in the given content. This method does not detect class methods inside (class << self), only class methods which starts with "self.". When a block is given, it yields the content of the method.
assert_migration "db/migrate/create_products.rb" do |migration| assert_class_method :up, migration do |up| assert_match /create_table/, up end end


