spec/fixtures/mappings/active_user_map.rb in spigot-0.2.2 vs spec/fixtures/mappings/active_user_map.rb in spigot-0.3.0

- old
+ new

@@ -1,9 +1,8 @@ module Spigot module Mapping class ActiveUser - def self.stub template do login :username full_name :name end @@ -22,37 +21,44 @@ template do login :username full_name :name options do primary_key :username - foreign_key :login end end end + def self.invalid_primary_key + template do + login :username + full_name :name + options do + primary_key :doesnotexist + end + end + end + def self.non_unique_keys template do login :username full_name :name auth_token :token options do primary_key :token - foreign_key :auth_token end end end private def self.template(&block) Spigot.define do service :github do resource :active_user do - self.instance_eval(&block) + instance_eval(&block) end end end end - end end end