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
240
0
Share
Rails Engines & RSpec
Amanda
January 21, 2016
More Decks by Amanda
See All by Amanda
Lessons Learned From an Elixir OTP Project
amandasposito
2
96
Aprendizados de um projeto Elixir OTP
amandasposito
4
630
SOLID - Dependency inversion principle
amandasposito
0
89
Como concorrência funciona em Elixir?
amandasposito
1
230
Programação Funcional & Elixir
amandasposito
3
130
Ecto, você sabe o que é ?
amandasposito
4
240
Novidades no Rails 5
amandasposito
0
100
Elixir e Phoenix
amandasposito
3
590
Elixir em 5 minutos
amandasposito
1
99
Other Decks in Technology
See All in Technology
エージェントスキルを作って自分のインプットに役立てよう
tsubakimoto_s
0
460
[OpsJAWS 40]リリースしたら終わり、じゃなかった。セキュリティ空白期間をAWS Security Agentで埋める
sh_fk2
3
260
弁護士ドットコム株式会社 エンジニア職向け 会社紹介資料
bengo4com
1
190
Pure Intonation on Browser: Building a Sequencer with Ruby
nagachika
0
170
No Types Needed, Just Callable Method Check
dak2
1
2.1k
GKE Agent SandboxでAIが生成したコードを 安全に実行してみた
lamaglama39
0
110
生成AIが変える SaaS の競争原理と弁護士ドットコムのプロダクト戦略
bengo4com
1
2.4k
音声言語モデル手法に関する発表の紹介
kzinmr
0
140
EMから幅を広げるために最近挑戦していること / Recent challenges I'm undertaking to expand my horizons beyond EM
hiro_torii
1
140
巨大プラットフォームを進化させる「第3のROI」
recruitengineers
PRO
2
1.4k
20260423_執筆の工夫と裏側 技術書の企画から刊行まで / From the planning to the publication of technical book
nash_efp
3
610
AI와 협업하는 조직으로의 여정
arawn
0
530
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
260
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
260
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
Speed Design
sergeychernyshev
33
1.6k
How STYLIGHT went responsive
nonsquared
100
6.1k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
180
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
340
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
340
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
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