Skip to content

Commit

Permalink
coverage for registry
Browse files Browse the repository at this point in the history
  • Loading branch information
mindreframer committed Nov 23, 2014
1 parent a4b6197 commit 4e88024
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/registry_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
require './test/test_helper'

describe 'ApiView::Registry' do
describe 'class methods' do
describe 'add_model' do
it "just works" do
model = Class.new
converter = Class.new
ApiView::Registry.add_model(model, converter)
ApiView::Registry.models.keys.must_include model.to_s
end
end

describe 'converter_for' do
it "just works" do
model = Class.new
converter = Class.new
ApiView::Registry.add_model(model, converter)

ApiView::Registry.converter_for(model).must_equal converter
end
end
end
end

0 comments on commit 4e88024

Please sign in to comment.