Sha256: ec1d5a7ee4b6c2ac4b54a3c263f11c7e6275f7221e037dd7b6e463af823aa5bd
Contents?: true
Size: 762 Bytes
Versions: 4
Compression:
Stored size: 762 Bytes
Contents
require 'rails/railtie' # We don't require rails for specs, but jbuilder works only in rails. # And it checks version of rails. I've decided to configure jbuilder for rails v4 module Rails module VERSION MAJOR = 4 end def self.version '4.2.0' end end require 'gon' require 'jbuilder' RSpec.configure do |config| config.before(:each) do RequestStore.store[:gon] = Gon::Request.new({}) @request = RequestStore.store[:gon] allow(Gon).to receive(:current_gon).and_return(@request) end end def request @request ||= double 'request', :env => {} end def wrap_script(content, cdata=true) script = "<script>" script << "\n//<![CDATA[\n" if cdata script << content script << "\n//]]>\n" if cdata script << '</script>' end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
gon-6.4.0 | spec/spec_helper.rb |
gon-6.3.2 | spec/spec_helper.rb |
gon-6.3.1 | spec/spec_helper.rb |
gon-6.2.1 | spec/spec_helper.rb |