From 1525a7b95f9eb396bed21cf5d496b82d5065e335 Mon Sep 17 00:00:00 2001 From: Washington Botelho Date: Thu, 8 Feb 2018 17:16:23 -0200 Subject: [PATCH] spec: xit spec where we need to know how to do --- spec/config/configure_spec.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 spec/config/configure_spec.rb diff --git a/spec/config/configure_spec.rb b/spec/config/configure_spec.rb new file mode 100644 index 0000000..cafdd42 --- /dev/null +++ b/spec/config/configure_spec.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe Rating::Config, '.configure' do + before do + Rating.configure do |config| + config.models rate: 'Review', rating: 'ReviewRating' + end + end + + let!(:author) { create :author } + let!(:resource) { create :article } + + xit 'changes the rating models' do + author.rate resource, 5 + + expect(Review.count).to eq 1 + expect(ReviewRating.count).to eq 1 + end +end