spec/parsers/user_parser_spec.rb in triviacrack-0.5.1 vs spec/parsers/user_parser_spec.rb in triviacrack-0.6.0
- old
+ new
@@ -5,11 +5,11 @@
describe ".parse" do
subject { TriviaCrack::Parsers::UserParser.parse raw_data }
context 'when given data from the user API' do
- let(:raw_data) { SpecData.get "user.json" }
+ let(:raw_data) { SpecData.get_json "user.json" }
it { is_expected.to be_a TriviaCrack::User }
its(:id) { is_expected.to be 111 }
its(:username) { is_expected.to eq "example" }
its(:facebook_id) { is_expected.to eq "1" }
@@ -26,10 +26,10 @@
its(:goal_points) { is_expected.to be 558 }
its(:level_up) { is_expected.to be false }
end
context 'when given opponent data from the game API' do
- let(:raw_data) { SpecData.get("game.json")["opponent"] }
+ let(:raw_data) { SpecData.get_json("game.json")["opponent"] }
it { is_expected.to be_a TriviaCrack::User }
its(:id) { is_expected.to be 111 }
its(:username) { is_expected.to eq "example.2" }
its(:facebook_id) { is_expected.to eq "" }