singular_name

singular_name() Instance Protected methods FIXME: We are avoiding to use alias because a bug on thor that make this method public and add it to the task list.

singular_table_name

singular_table_name() Instance Protected methods

table_name

table_name() Instance Protected methods

uncountable?

uncountable?() Instance Protected methods

wrap_with_namespace

wrap_with_namespace(content) Instance Protected methods

assert_class_method

assert_class_method(method, content, &block) Instance Public methods 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

assert_directory

assert_directory(relative, *contents) Instance Public methods Alias for: assert_file

assert_field_default_value

assert_field_default_value(attribute_type, value) Instance Public methods Asserts the given attribute type gets a proper default value: assert_field_default_value :string, "MyString"

assert_field_type

assert_field_type(attribute_type, field_type) Instance Public methods Asserts the given attribute type gets translated to a field type properly: assert_field_type :date, :date_select

assert_file

assert_file(relative, *contents) Instance Public methods Asserts a given file exists. You need to supply an absolute path or a path relative to the configured destination: assert_file "config/environment.rb" You can also give extra arguments. If the argument is a regexp, it will check if the regular expression matches the given file content. If it's a string, it compares the file with the given string: assert_file "config/environment.rb", /initialize/ Finally, when a block is giv