Sha256: b355ed32e6ee2cd8b42e63c9674b28a6847f63a01fc2af53f02efedf5d104063
Contents?: true
Size: 689 Bytes
Versions: 1
Compression:
Stored size: 689 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_file "app/views/admin/photos/index.html.haml" 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
redde-0.1.2 | spec/generators/photo_generator_spec.rb |