-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tiny refactory for specs of controller of deputados.
[#43]
- Loading branch information
Showing
10 changed files
with
111 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
# config/chewy.yml | ||
# separate environment configs | ||
test: | ||
host: 'localhost:9250' | ||
host: 'es:9200' | ||
prefix: 'test' | ||
|
||
development: | ||
host: 'localhost:9200' | ||
host: 'es:9200' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
test: | ||
host: 'localhost:9200' | ||
prefix: 'test' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ default: &default | |
pool: 5 | ||
username: root | ||
password: | ||
host: | ||
host: db | ||
port: 3306 | ||
|
||
development: | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
Chewy.root_strategy = :atomic | ||
Chewy.use_after_commit_callbacks = !Rails.env.test? |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,20 @@ | |
total_votos 123 | ||
porcentagem_votos 10.0 | ||
situacao_candidatura "Eleito" | ||
|
||
factory :john_doe do | ||
nome "John Doe" | ||
nome_parlamentar "Jonny" | ||
email "[email protected]" | ||
matricula 90 | ||
|
||
url_foto "http://url.com/foto" | ||
partido "ANOTHER" | ||
uf "AN" | ||
id_cadastro "54321" | ||
total_votos 456 | ||
porcentagem_votos 11.0 | ||
situacao_candidatura "Eleito" | ||
end | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'chewy/rspec' | ||
|
||
RSpec.configure do |config| | ||
config.before(:suite) do | ||
Chewy.strategy(:bypass) | ||
end | ||
end |