spec/parsers/question_parser_spec.rb in triviacrack-0.5.1 vs spec/parsers/question_parser_spec.rb in triviacrack-0.6.0
- old
+ new
@@ -5,11 +5,11 @@
describe ".parse" do
subject { TriviaCrack::Parsers::QuestionParser.parse raw_data }
context 'when given data without an image' do
- let(:raw_data) { SpecData.get "question.json" }
+ let(:raw_data) { SpecData.get_json "question.json" }
it { is_expected.to be_a TriviaCrack::Question }
its(:type) { is_expected.to be :normal }
its(:media_type) { is_expected.to be :normal }
its(:text) { is_expected.to eq "Who recorded this album?" }
@@ -17,10 +17,10 @@
its(:category) { is_expected.to be :entertainment }
its(:answers) { is_expected.to contain_exactly "Creedence Cleawater Revival", "Bob Marley", "blink-182", "Jimmy Hendrix" }
end
context 'when given data with an image' do
- let(:raw_data) { SpecData.get "question_image.json" }
+ let(:raw_data) { SpecData.get_json "question_image.json" }
it { is_expected.to be_a TriviaCrack::Question }
its(:type) { is_expected.to be :normal }
its(:media_type) { is_expected.to be :image }
its(:text) { is_expected.to eq "Who recorded this album?" }