Sha256: 1b78aa3447889dab1ff1ff2821d51fd8262e95a90dd44ed28ad6934a93b3227c
Contents?: true
Size: 678 Bytes
Versions: 8
Compression:
Stored size: 678 Bytes
Contents
require 'spec_helper' describe Redde::Generators::PhotoGenerator do include GeneratorSpec::TestCase destination File.expand_path("../../../tmp", __FILE__) before(:all) do prepare_destination run_generator end after(:all) do FileUtils.rm_rf 'tmp' end it "Generates controller" do assert_file "app/controllers/admin/photos_controller.rb" end it "Generates views" do assert_directory "app/views/admin/photos" end it "Generates model" do assert_file "app/models/photo.rb" end it "Generates migration" do files = Dir["tmp/db/migrate/*.rb"] expect(files.map(&:to_s).join(" ").index("create_photos")).to eq 30 end end
Version data entries
8 entries across 8 versions & 1 rubygems