Sha256: c5ce4781915a5c44dc1dac4ef3b1598a4592c0a5a787ef1f8769f3161701b36f
Contents?: true
Size: 940 Bytes
Versions: 3
Compression:
Stored size: 940 Bytes
Contents
require 'spec_helper' require 'synchromesh/integration/test_components' require 'reactive_record/factory' require 'rspec-steps' RSpec::Steps.steps 'DummyValue', js: true do before(:step) do # spec_helper resets the policy system after each test so we have to setup # before each test # stub_const 'TestApplication', Class.new # stub_const 'TestApplicationPolicy', Class.new # TestApplicationPolicy.class_eval do # always_allow_connection # regulate_all_broadcasts { |policy| policy.send_all } # allow_change(to: :all, on: [:create, :update, :destroy]) { true } # end size_window(:small, :portrait) end it 'works with string interpolation (defines a JS .toString method)' do expect_evaluate_ruby do column_hash = { default: 'foo', sql_type_metadata: { type: 'text' } } "value = #{ReactiveRecord::Base::DummyValue.new(column_hash)}" end.to eq('value = foo') end end
Version data entries
3 entries across 3 versions & 1 rubygems