This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
module RailsTest | |
class TestableController < ActionController::Base | |
def test_action | |
render text: "Success" | |
end | |
end | |
class TestCaseTest < ActionController::TestCase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "test_helper" | |
class FactoryGirlTest < ActiveSupport::TestCase | |
class User < ActiveRecord::Base | |
end | |
@@count = 0 | |
def self.count=(value); @@count = value; end | |
def self.count; @@count; end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
# This test class allows us to test CarrierWave specific behaviour, the application relies on. | |
class CarrierWaveTest < ActiveSupport::TestCase | |
# We define an artificial ActiveRecord class using CarrierWave and fog. | |
class TestUser < ActiveRecord::Base | |
mount_uploader :avatar do | |
storage :fog | |
def store_dir |