Created
March 30, 2012 15:36
-
-
Save nickboyce/2252326 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "as_json method" do | |
subject { artwork.to_json } | |
# test the root object structure | |
it { should have_json_type(String).at_path("artist_id") } | |
it { should have_json_type(Array).at_path("available_sizes") } | |
# test a nested object | |
it { should have_json_type(Object).at_path("artist") } | |
it { should have_json_type(String).at_path("artist/id") } | |
it { should have_json_type(String).at_path("artist/slug") } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment