Skip to content

Instantly share code, notes, and snippets.

Created December 8, 2015 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/538a267c22f68b8ae7da to your computer and use it in GitHub Desktop.
Save anonymous/538a267c22f68b8ae7da to your computer and use it in GitHub Desktop.
describe CSVToJSON do
context '#to_json' do
let(:dummy) { Class.new { include CSVToJSON } }
subject { dummy.new }
it 'changes #read array of arrays to json' do
expect(subject).to receive(:read).and_return([['header'], ['cell']])
expect(subject.to_json).to eq 'foo'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment