Sha256: c9a2044272918bee23f09ef012ffc21f51aefc119b2061af246c6724249f82ee
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
require 'simplecov' SimpleCov.start require 'spec' require 'spec/autorun' require File.dirname(__FILE__) + '/../lib/vraptor-scaffold' def build_attributes [Attribute.new("name", "string"), Attribute.new("myFlag", "boolean"), Attribute.new("price", "double"), Attribute.new("category", "references")] end def mock_config_file file = YAML.load_file File.join( File.dirname(__FILE__), "resources", "vraptor-scaffold.properties") Configuration.stub!(:config).and_return(file) end def mock_objectify_config_file file = YAML.load_file File.join( File.dirname(__FILE__), "resources", "vraptor-scaffold-objectify.properties") Configuration.stub!(:config).and_return(file) end def exists_and_identical?(source, created) c = File.open(created).read.gsub( /\r/m, "" ) c2 = File.open(source).read.gsub( /\r/m, "" ) c.should be == c2 end def mock_http_request http_request = mock(Net::HTTP) http_request.stub!(:get).with(kind_of(String)).and_return(http_request) http_request.stub!(:body).and_return("corpo :)") VraptorScaffold::HttpRequest.stub!(:open_session).with(kind_of(String)).and_return(http_request) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vraptor-scaffold-1.3.0 | spec/spec_helper.rb |