Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rails Engines & RSpec
Search
Amanda
January 21, 2016
Technology
0
210
Rails Engines & RSpec
Amanda
January 21, 2016
Tweet
Share
More Decks by Amanda
See All by Amanda
Lessons Learned From an Elixir OTP Project
amandasposito
2
61
Aprendizados de um projeto Elixir OTP
amandasposito
4
520
SOLID - Dependency inversion principle
amandasposito
0
70
Como concorrência funciona em Elixir?
amandasposito
1
220
Programação Funcional & Elixir
amandasposito
3
120
Ecto, você sabe o que é ?
amandasposito
4
230
Novidades no Rails 5
amandasposito
0
95
Elixir e Phoenix
amandasposito
3
550
Elixir em 5 minutos
amandasposito
1
86
Other Decks in Technology
See All in Technology
PicoRabbit: a Tiny Presentation Device Powered by Ruby
harukasan
PRO
2
240
PagerDuty×ポストモーテムで築く障害対応文化/Building a culture of incident response with PagerDuty and postmortems
aeonpeople
2
340
クラウド開発環境Cloud Workstationsの紹介
yunosukey
0
180
SnowflakeとDatabricks両方でRAGを構築してみた
kameitomohiro
1
440
QA/SDETの現在と、これからの挑戦
imtnd
0
140
YOLOv10~v12
tenten0727
4
960
AI Agentを「期待通り」に動かすために:設計アプローチの模索と現在地
kworkdev
PRO
2
460
白金鉱業Meetup_Vol.18_生成AIはデータサイエンティストを代替するのか?
brainpadpr
3
110
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
120
ここはMCPの夜明けまえ
nwiizo
28
10k
バックオフィス向け toB SaaS バクラクにおけるレコメンド技術活用 / recommender-systems-in-layerx-bakuraku
yuya4
6
550
PostgreSQL Log File Mastery: Optimizing Database Performance Through Advanced Log Analysis
shiviyer007
PRO
0
100
Featured
See All Featured
Side Projects
sachag
452
42k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
Speed Design
sergeychernyshev
29
900
Designing Experiences People Love
moore
141
24k
4 Signs Your Business is Dying
shpigford
183
22k
Fireside Chat
paigeccino
37
3.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
A Modern Web Designer's Workflow
chriscoyier
693
190k
For a Future-Friendly Web
brad_frost
176
9.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Transcript
Rails Engines e RSpec
“Engines can be considered miniature applications that provide functionality to
their host applications. “ http://guides.rubyonrails.org/engines.html
Ruby Gem + MVC “A Rails application is actually just
a ‘supercharged’ engine”
None
É uma maneira de organizar e compartilhar código reutilizável através
de uma ou mais aplicações.
Core Modulo Financeiro Modulo Logística
Redundância Melhor manutenção
Trade-offs
Criando uma Rails Engine do Zero
Nome da nossa engine Sem os arquivos do Test::Unit Plugin
isolado por namespace Cria com uma estrutura padrão com a dummy application especificada
Dummy Application Quando geramos a engine, a partir da linha
de comando, existe uma pequena aplicação dentro do diretório de testes.
None
Ela existe básicamente por que não existe um jeito de
se testar uma Rails Engine fora de uma aplicação Rails
.gemspec
As dependências devem ser adicionadas nesse arquivo para evitar conflitos
na hora de plugar a engine
None
rails generate rspec:install
Obrigada!
Referências https://medium.com/@amandasposito/rails-engines-e-rspec-6e7a8645dc5b#.nemad0vpz http://rspec.info/ http://guides.rubyonrails.org/engines.html https://www.bignerdranch.com/blog/intro-to-rails-engines/ http://stackoverflow.com/questions/6118905/rails-3-1-engine-vs-mountable-app