Sha256: d4ba357b1c50e5e462ba95583237032108acafc47e20f83dc5760c38b667ab2b
Contents?: true
Size: 631 Bytes
Versions: 1
Compression:
Stored size: 631 Bytes
Contents
require 'spec_helper' describe WidgetWithOptions do subject(:widget) { described_class.new :name => 'widget-name', :code => 1234 } describe :to_csv do subject { widget.to_csv(options) } context 'with style = :full' do let(:options) { {:style => :full} } it do should == <<-CSV.strip_heredoc name,code,full widget-name,1234,true CSV end end context 'with style = :short' do let(:options) { {:style => :short} } it do should == <<-CSV.strip_heredoc name,code widget-name,1234 CSV end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
as_csv-1.0.2 | spec/models/widget_with_options_spec.rb |