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
200
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
55
Aprendizados de um projeto Elixir OTP
amandasposito
4
490
SOLID - Dependency inversion principle
amandasposito
0
66
Como concorrência funciona em Elixir?
amandasposito
1
210
Programação Funcional & Elixir
amandasposito
3
110
Ecto, você sabe o que é ?
amandasposito
4
230
Novidades no Rails 5
amandasposito
0
91
Elixir e Phoenix
amandasposito
3
540
Elixir em 5 minutos
amandasposito
1
83
Other Decks in Technology
See All in Technology
コロプラのオンボーディングを採用から語りたい
colopl
5
530
OPENLOGI Company Profile
hr01
0
58k
OCI技術資料 : ファイル・ストレージ 概要
ocise
3
12k
When Windows Meets Kubernetes…
pichuang
0
270
Visual StudioとかIDE関連小ネタ話
kosmosebi
1
320
実践! ソフトウェアエンジニアリングの価値の計測 ── Effort、Output、Outcome、Impact
nomuson
0
1.8k
「隙間家具OSS」に至る道/Fujiwara Tech Conference 2025
fujiwara3
4
1.2k
Amazon Q Developerで.NET Frameworkプロジェクトをモダナイズしてみた
kenichirokimura
1
160
エンジニアリングマネージャー視点での、自律的なスケーリングを実現するFASTという選択肢 / RSGT2025
yoshikiiida
4
3.3k
AI×医用画像の現状と可能性_2024年版/AI×medical_imaging_in_japan_2024
tdys13
1
1.3k
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
170
10年もののバグを退治した話
n_seki
0
150
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Rails Girls Zürich Keynote
gr2m
94
13k
Making the Leap to Tech Lead
cromwellryan
133
9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
Typedesign – Prime Four
hannesfritz
40
2.5k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Practical Orchestrator
shlominoach
186
10k
Fireside Chat
paigeccino
34
3.1k
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