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
250
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rails Engines & RSpec
Amanda
January 21, 2016
More Decks by Amanda
See All by Amanda
Lessons Learned From an Elixir OTP Project
amandasposito
2
110
Aprendizados de um projeto Elixir OTP
amandasposito
4
650
SOLID - Dependency inversion principle
amandasposito
0
100
Como concorrência funciona em Elixir?
amandasposito
1
240
Programação Funcional & Elixir
amandasposito
3
140
Ecto, você sabe o que é ?
amandasposito
4
250
Novidades no Rails 5
amandasposito
0
110
Elixir e Phoenix
amandasposito
3
600
Elixir em 5 minutos
amandasposito
1
110
Other Decks in Technology
See All in Technology
Level Up Your CDK DX: 5 Tools I’ve Been Building
gotok365
2
190
[RSJ26] Building a VLA Model Based on Self-Distilled Classification
keio_smilab
PRO
0
190
振り返りこそエンジニアの本領
negima
0
290
Self Healing Rollouts: Automating Production Fixes with Agentic AI
kdubois
0
150
Tab5をRubyで動くパソコンにする
kishima
1
180
DMMブックスのNext.js化を加速させるAI活用 / Migrating DMM Books to Next.js with AI
kentarom
1
330
AIとペアプロを始める。人とのペアプロをやめる。ペアプロの良さを改めて知る。もっと好きになった。 / Rediscovering Pair Programming
honyanya
1
230
JAWS-UG初心者支部#88わいわい初心塾(夏休みの宿題やったかGit編)
otsuki
0
120
[RSJ26] AnoleVLA: Lightweight Vision-Language-Action Model with Deep State Space Models for Mobile Manipulation
keio_smilab
PRO
0
120
AIに丸投げしないトイル削減 / Eliminating Toil Without Leaving It All to AI
kohbis
2
150
Bet AI Day 2026丨Production-Ready AI Agents — エンタープライズの実務を任せるための設計と運用
layerx
PRO
3
2.1k
Azure App Service / Container Apps の組み込み認証
kuniteru
0
190
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
How to Talk to Developers About Accessibility
jct
2
540
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Typedesign – Prime Four
hannesfritz
42
3.2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
250
Code Review Best Practice
trishagee
74
20k
The Spectacular Lies of Maps
axbom
PRO
1
970
Building an army of robots
kneath
306
46k
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