Sha256: f631501eca16a5ec80a0dd77b3d36c62abfb98e99847758cbf5e8e4205b41800
Contents?: true
Size: 1.36 KB
Versions: 1
Compression:
Stored size: 1.36 KB
Contents
require File.expand_path(File.dirname(__FILE__) + "/../../../../spec_helper") describe ObjectifyModelGenerator do context "objectify" do before(:all) do GaeAppGenerator.new("gae-project", ["-o=objectify", "--skip_jquery"]).invoke_all FileUtils.chdir("gae-project") @generator = ObjectifyModelGenerator.new("product", build_attributes) @generator.build FileUtils.chdir("..") @project_path = "gae-project" end before(:each) do mock_objectify_config_file end after(:all) do FileUtils.remove_dir "gae-project" end it "should create model" do source = File.join File.dirname(__FILE__), "templates", "Objectify_Product.java" destination = @project_path + File::Separator + Configuration.main_class_path("models", "Product.java") exists_and_identical?(source, destination) end it "should create model test" do test_class = @project_path + File::Separator + Configuration.test_class_path("models", "ProductTest.java") File.exist?(test_class).should be_true end it "should map model in objetify factory" do source = File.join File.dirname(__FILE__), "templates", "ObjectifyFactory.java" destination = File.join "gae-project", Configuration::MAIN_SRC, "app", "infra", "ObjectifyFactory.java" exists_and_identical?(source, destination) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vraptor-scaffold-1.3.0 | spec/vraptor-scaffold/generators/scaffold/model_generator/objectify_model_generator_spec.rb |